import { reqCategoryList, reqBannerList, reqFloorList } from '@/api'

export default {
  usenamespaced: true,
  state: {
    categoryList: [],
    bannerList: [],
    floorList: []
  },
  actions: {
    getCategoryList: async ({ commit }) => commit('CATEGORY_LIST', await reqCategoryList()),
    getBannerList: async ({ commit }) => commit('BANNER_LIST', await reqBannerList()),
    getFloorList: async ({ commit }) => commit('FLOOR_LIST', await reqFloorList()),

  },
  mutations: {
    CATEGORY_LIST: (context, data) => context.categoryList = data,
    BANNER_LIST: (context, data) => context.bannerList = data,
    FLOOR_LIST: (context, data) => context.floorList = data,
  },
  getters: {}
}